package br.com.alinesoftware.app.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull;

import com.powerlogic.jcompany.domain.validation.PlcUnifiedValidation;
import com.powerlogic.jcompany.domain.validation.PlcValSimpleFormat;
import com.powerlogic.jcompany.domain.validation.PlcValSimpleFormat.SimpleFormat;

@MappedSuperclass
@PlcUnifiedValidation
public abstract class Telefone implements Serializable {

	private static final long serialVersionUID = -4837863063302556570L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "SE_TELEFONE")
	@Column(nullable = false, length = 5)
	private Long id;

	@NotNull
	@PlcValSimpleFormat(format=SimpleFormat.NUMBER)
	@Column(length = 2)
	private Integer codPais;

	@NotNull
	@PlcValSimpleFormat(format=SimpleFormat.NUMBER)
	@Column(length = 3)
	private Integer ddd;

	@NotNull
	@PlcValSimpleFormat(format=SimpleFormat.NUMBER)
	@Column(length = 8)
	private Integer numeroTelefone;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getCodPais() {
		return codPais;
	}

	public void setCodPais(Integer codPais) {
		this.codPais = codPais;
	}

	public Integer getDdd() {
		return ddd;
	}

	public void setDdd(Integer ddd) {
		this.ddd = ddd;
	}

	public Integer getNumeroTelefone() {
		return numeroTelefone;
	}

	public void setNumeroTelefone(Integer numeroTelefone) {
		this.numeroTelefone = numeroTelefone;
	}

}
